package com.keqiongzc.myapplication

import android.app.Application
import android.content.Context
import androidx.startup.Initializer
import com.alibaba.android.arouter.launcher.ARouter
import com.everyline.lib_common.global.Configurator
import com.tencent.mmkv.MMKV

/**
 * Created by on 2021/2/26.
 * 天天挂线
 *  746608431@qq.com
 *  描述:TODO
 */

class AppInitializer : Initializer<Unit> {
    override fun create(context: Context) {
        if (BuildConfig.DEBUG) {
            ARouter.openDebug()
        }
        Configurator.instance.withWebApiHost(BuildConfig.BASE_URL,"6").configure()
        MMKV.initialize(context)
        ARouter.init(context.applicationContext as Application)
    }

    override fun dependencies(): List<Class<out Initializer<*>>> {
        return emptyList()
    }
}